package com.panshi.api.api;

import com.panshi.api.bean.ArticleBean;
import com.panshi.api.bean.TypeBean;
import com.panshi.api.util.PageSizeVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;

import javax.websocket.server.PathParam;
import java.util.List;

/**
 * @author XiaoWangYa
 * @version 1.0
 * @date 2020/8/7 0007 下午 2:27
 */
@FeignClient("XiaoWangYa")
@Api("类型接口")
public interface TypePort {

    @PostMapping("/addType")
    @ResponseBody
    @ApiOperation("口腔分类 add")
    String addTypeInfo (@RequestBody TypeBean typeBean);

    @PostMapping("/deleteType/{id}")
    @ResponseBody
    @ApiOperation("口腔分类 delete")
    String deleteTypeInfo(@PathVariable String id);

    @PostMapping("/queryTypeInfoAll")
    @ResponseBody
    @ApiOperation("查询分类 query")
    List<TypeBean> queryTypeInfoAll();

    @PostMapping("/queryArticleInfoAll")
    @ResponseBody
    @ApiOperation("咨询分类 query")
    List<TypeBean> queryArticleInfoAll();

    @PostMapping("/queryAnswerInfoAll")
    @ResponseBody
    @ApiOperation("问答分类 query")
    List<TypeBean> queryAnswerInfoAll();

    @PostMapping("/updateType")
    @ResponseBody
    @ApiOperation("口腔分类 update")
    String updateTypeInfo (@RequestBody TypeBean typeBean);
}
